package com.partsoft.dits.message;

import java.io.Serializable;

import org.springframework.util.Assert;

/**
 * 抽象的消息数据对象
 */
@SuppressWarnings({"serial"})
public abstract class AbstractMessageDataItem extends BaseMessageConcatenation implements MessageDataItem, Cloneable, Serializable {
	
	private MessageEntity ownerMessageEntity;
	
	public AbstractMessageDataItem(MessageEntity ownerEntity) {
		setOwner(ownerEntity);
	}
	
	public MessageEntity getOwner() {
		return ownerMessageEntity;
	}
	
	public void setOwner(MessageEntity ownerMessageEntity) {
		Assert.notNull(ownerMessageEntity);
		this.ownerMessageEntity = ownerMessageEntity;
	}

	@Override
	public AbstractMessageDataItem clone() {
		AbstractMessageDataItem ac = (AbstractMessageDataItem) super.clone();
		//TODO 谁来进行优化实现
		return ac;
	}
	
}
